package com.jthinker.blog.service.impl;

import com.jthinker.blog.bean.entity.Menu;
import com.jthinker.blog.dao.BaseDao;
import com.jthinker.blog.dao.MenuDao;
import com.jthinker.blog.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * User: Gang Chen
 * Date: 2015/6/28 13:26
 */
@Service
public class MenuServiceImpl extends BaseServiceImpl<Menu, Long> implements MenuService
{
    private MenuDao menuDao;

    @Override
    @Autowired
    @Qualifier("menuDao")
    protected void setBaseDao(BaseDao baseDao)
    {
        this.baseDao = baseDao;
        this.menuDao = (MenuDao) baseDao;
    }

    @Override
    public List<Menu> listAllBySort()
    {
        return menuDao.listAllBySort();
    }
}
